<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点</title>
	<style type="text/css">
#p1{
	height: 200px;
	width: 200px;
	background: blue;
}
#p2{
	height: 200px;
	width: 200px;
	background: blue;
}

	</style>

	
</head>
<body>
<div id="div1">
<p id="p1">这是一个段落</p>	
<p id="p2">这是另一个段落</p>
</div>
<script type="text/javascript">
	var para=document.createElement("p");
	var node=document.createTextNode("这是一个新的段落");
	para.appendChild(node);
	var element=document.getElementById("div1");
	element.appendChild(para);
	</script>
	
</body>
</html>